/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wiai.untl.core.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

/**
 *
 * @author Hendro Steven
 */
@Entity
public class Jadwal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @ManyToOne
    private Matakuliah matakuliah;
    private String kodeKelas;
    @ManyToOne
    private Dosen dosen;
    @OneToOne
    private Semester semester;
    private int jamMulai;
    private int jamSelesai;
    @ManyToOne
    private Hari hari;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    

    @Override
    public String toString() {
       return this.getMatakuliah().getNamaMatakuliah() + "("+this.getHari().getNamaHari()+" "+this.getJamMulai()+" - "+this.getJamSelesai()+")";
    }

    /**
     * @return the matakuliah
     */
    public Matakuliah getMatakuliah() {
        return matakuliah;
    }

    /**
     * @param matakuliah the matakuliah to set
     */
    public void setMatakuliah(Matakuliah matakuliah) {
        this.matakuliah = matakuliah;
    }

    /**
     * @return the kodeKelas
     */
    public String getKodeKelas() {
        return kodeKelas;
    }

    /**
     * @param kodeKelas the kodeKelas to set
     */
    public void setKodeKelas(String kodeKelas) {
        this.kodeKelas = kodeKelas;
    }

    /**
     * @return the dosen
     */
    public Dosen getDosen() {
        return dosen;
    }

    /**
     * @param dosen the dosen to set
     */
    public void setDosen(Dosen dosen) {
        this.dosen = dosen;
    }

    /**
     * @return the semester
     */
    public Semester getSemester() {
        return semester;
    }

    /**
     * @param semester the semester to set
     */
    public void setSemester(Semester semester) {
        this.semester = semester;
    }

    /**
     * @return the jamMulai
     */
    public int getJamMulai() {
        return jamMulai;
    }

    /**
     * @param jamMulai the jamMulai to set
     */
    public void setJamMulai(int jamMulai) {
        this.jamMulai = jamMulai;
    }

    /**
     * @return the jamSelesai
     */
    public int getJamSelesai() {
        return jamSelesai;
    }

    /**
     * @param jamSelesai the jamSelesai to set
     */
    public void setJamSelesai(int jamSelesai) {
        this.jamSelesai = jamSelesai;
    }

    /**
     * @return the hari
     */
    public Hari getHari() {
        return hari;
    }

    /**
     * @param hari the hari to set
     */
    public void setHari(Hari hari) {
        this.hari = hari;
    }
    
}
